﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PPI.Client.Presenter;
using PPI.Client.Utils;
using PPI.Entities.Inspections;

namespace PPI
{
    public partial class frmSplashInspection : frmBase, ISplashInspection
    {
        private Int32 m_InspectionId;
        private EInspection m_Inspection;
        private SplashInspectionPresenter m_Presenter;



        public frmSplashInspection()
        {
            InitializeComponent();
            base.MenuMain.Visible = false;
            base.FormSize = FormSizes.Medium;

        }

        public string ActionMessage
        {
            set { lblToTellAction.Text = value; }
        }

        public int ActionProgress
        {
            set { pbAction.Value = value; }
        }

        public int InspectionId
        {
            get { return m_InspectionId; }
            set { m_InspectionId = value; }
        }

        public EInspection Inspection
        {
            set { m_Inspection = value; }
            get { return m_Inspection; }
        }

        public void Finish()
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void frmSplashInspection_Load(object sender, EventArgs e)
        {
            try
            {
                m_Presenter = new SplashInspectionPresenter(this);
            }
            catch (Exception ex)
            {
                RegisterError.SaveError(ex);
            }
        }
    }
}
